{% extends 'base.html.twig' %}
{% import 'Import/app_import.html.twig' as appImport %}

{% block head_title %}{{ 'subscriptions'|trans }} - {{ subscription.id }}{% endblock %}

{% block heading_1 %}
    {{ appImport.heading({'level': 1, 'title': 'subscriptions'|trans, 'link': {'url': path('app_subscriptions')}}) }}
{% endblock %}

{% block heading_2 %}
    {{ appImport.heading({'level': 2, 'title': subscription.id}) }}
{% endblock %}

{% block main_content %}
    {% embed 'Embed/block_embed.html.twig' %}
        {% import 'Import/app_import.html.twig' as appImport %}
        {% block content %}
            {{ appImport.heading({'level': 3, 'title': 'update'|trans}) }}

            <p>
                <strong>{{ 'type'|trans }}</strong><br>
                {{ ('subscription_' ~ subscription.type)|trans }}
            </p>

            {% if 'email' == subscription.type %}
                <p>
                    <strong>{{ 'email'|trans }}</strong><br>
                    {{ subscription.endpoint }}
                </p>
            {% else %}
                <p>
                    <strong>{{ 'endpoint'|trans }}</strong><br>
                    {{ subscription.endpoint }}
                </p>
            {% endif %}

            {{ appImport.form({'form': form}) }}
        {% endblock %}
    {% endembed %}
{% endblock %}
